﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WorkPlatform.aspx.cs" Inherits="HQWeb.Login.WorkPlatform" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <%--<link href="../Styles/OrderViewStyle.css" rel="Stylesheet" type="text/css" />--%>

    <script type="text/javascript">
        function orderView(orderID) {
            //location = "../View/Order/OrderView.aspx?orderID=" + orderID;
            //window.open("../View/Order/OrderView.aspx?orderID=" + orderID, "", "top=150px,left=200px,height=480px,width=800px");
        }
        function changeAll() {
            if ($("#checkAll").attr("checked")) {
                $("#checkCDS").attr("checked", 'true');
                $("#checkCamera").attr("checked", 'true');
                $("#checkGoods").attr("checked", 'true');
            }
            else {
                $("#checkCDS").removeAttr("checked");
                $("#checkCamera").removeAttr("checked");
                $("#checkGoods").removeAttr("checked");
            }
        }


        function PopBox(Poptype, obj) {
            $(".contenttitle").click(function () { $(".contentpage").slideUp(); $("#contentcontainer").html(""); });
            $(".contentpage").css("right", -7);
            $(".contentpage").css("top", 36);
            if (Poptype == "1") {
                $(".contentpage").css("top", -6);
                $(".contentpage").css("width", 800);
                $("#contentcontainer").load('../View/Order/OrderView.aspx?orderID=' + obj + ' #orderview');
            }
            else if (Poptype == "2") {
                var PostData = { type: 'contact', id: obj };
                GetReminder(PostData);
                $(".contentpage").css("width", 450);
            }
            else if (Poptype == "3") {
                var PostData = { type: 'payment', id: obj };
                GetReminder(PostData);
                $(".contentpage").css("width", 450);
            }
            else if (Poptype == "4") {
                var PostData = { type: 'goods', id: obj };
                GetReminder(PostData);
                $(".contentpage").css("width", 450);
                if ($.browser.msie) {
                    $('input:checkbox').click(function () {
                        this.blur();
                        this.focus();
                    });
                }
            }
            $(".contentpage").show();
        }


        function GetReminder(PostData) {
            var url = "../View/GetReminder.ashx";
            $.ajax({
                cache: "False",
                type: "POST",
                async: false,
                url: url,
                data: PostData,
                success: function (counct) {
                    $("#contentcontainer").html(counct); 
                },
                error: function (xhr, ajaxOptions, thrownError)
                { alert("网络异常，稍后重试！"); return false; }
            });
        }

        function SaveContact() {
            var orderID = $("#contactOrderID").val();
            var customerID = $("#contactCustomerID").val();
            var neirong = $("#neirong").val();
            var beizhu = $("#beizhu").val();
            var PostData = { type: 'savecontact', id: orderID, customer: customerID, contactcontent: neirong, remark: beizhu };
            SaveReminder(PostData);
        }

        function SavePayment() {
            var orderID = $("#paymentOrderID").val();
            var paymoney = $("#textPayment").val();
            var beizhu = $("#textRemark").val();
            var PostData = { type: 'savepayment', id: orderID, money: paymoney, remark: beizhu };
            SaveReminder(PostData);
        }

        function SaveGoods() {
            var orderID = $("#goodsOrderID").val();
            var checkCDS = 0, checkCamera = 0, checkGoods = 0;
            if ($("#checkCDS").attr("checked")) {
             checkCDS = 1
         }
         if ($("#checkCamera").attr("checked")) {
             checkCamera = 1;
         }
         if ($("#checkGoods").attr("checked")) {
             checkGoods = 1;
         }
         var PostData = { type: 'savegoods', id: orderID, CDS: checkCDS, Camera: checkCamera, Goods: checkGoods };
         SaveReminder(PostData);
        }

        function SaveReminder(PostData) {
            var url = "../View/GetReminder.ashx";
            $.ajax({
                cache: "False",
                type: "POST",
                async: false,
                url: url,
                data: PostData,
                success: function () {
                    $(".contentpage").slideUp();
                    //alert("保存成功！")
                    $("#remindercontainer").load('../Login/WorkPlatform.aspx');
                },
                error: function (xhr, ajaxOptions, thrownError)
                { alert("网络异常，稍后重试！"); return false; }
            });
        }
    </script>
    <style type="text/css">
        .title
        {
            border: 1px solid #C1DAD7;
            border-right: 1px solid #C1DAD7;
            border-bottom: 1px solid #C1DAD7;
            border-top: 1px solid #C1DAD7;
            letter-spacing: 2px;
            text-transform: uppercase;
            text-align: left;
            padding: 6px 6px 6px 12px;
            background: #CAE8EA no-repeat;
            text-align: center;
        }
        .tableclass
        {
            /*修正单元格之间的边框不能合并*/
            border-style: solid;
            border-color: inherit;
            border-width: 1px;
            border-collapse: collapse;
            background-color: #4bc6e5;
        }
        .tdclass
        {
	        border: 1px solid #C1DAD7;
        }
        .trclass
        {
	        background-color: #ffffff;
        }
        .contentpage
        {
            background-color: #D0DEF0;
            width: 450px; /*padding: 2px;*/
            margin: 5px; /*控制窗口绝对定位*/
            position: absolute;
            border: 2px solid #D0DEF0;
            display: none;
            z-index: 110;
        }
        #contentcontainer
        {
            padding: 2px; /*控制区域内容超过指定高度和宽度时显示滚动条*/
            overflow: auto;
        }
         .contenttitle
        {
            padding: 4px;
            font-size: 14px;
        }
        .contenttitle img
        {
            width: 14px;
            height: 14px;
            float: right;
            cursor: pointer;
        }
        
        
.OrderViewStyle
        {
            border-right: 1px solid #A7A6AA;
            border-bottom: 1px solid #A7A6AA;
            border-left: 1px solid #A7A6AA;
            border-top: 1px solid #A7A6AA;
           
            padding: 0px;
        }
        .OrderViewStyle a
        {
            color: Black;
            
        }
        .OrderViewHeaderStyle th
        {
            border-left: 1px solid #A7A6AA;
            border-right: 1px solid #A7A6AA;
        }
        .OrderViewHeaderStyle
        {
           background-color: #242424;
            font-weight: bold;
            color: #242424;
            background:url(../Images/2bgbg.jpg); 
        }
        .OrderViewFooterStyle
        {
            background-color: #5D7B9D;
            font-weight: bold;
            color: #A7A6AA;
        }
        .OrderViewRowStyle
        {
            background-color: #E0F0F3;
            color: #333333;
        }
        .OrderViewAlternatingRowStyle
        {
            background-color: #FFFFFF;
            color: #284775;
        }
        .OrderViewRowStyle td, .OrderViewAlternatingRowStyle td
        {
            border: 1px solid #A7A6AA;
        }
        .OrderViewSelectedRowStyle
        {
            background-color: #E2DED6;
            font-weight: bold;
            color: #333333;
        }
        .OrderViewPagerStyle
        {
            color: #242424;
            background:url(../Images/1bgbg.jpg);
        }
        .OrderViewPagerStyle table /**/ /* to center the paging links*/
        {
             border-left: 1px  #EBE9ED;
             border-right: 1px  #EBE9ED;
          
        }

       #all a:active,
       #all a:visited,
       #all a:link 
         {
          text-decoration: none;
          margin: 1px 2px 1px 0px;
          padding: 1px 2px 1px 2px;
          color: #00527f;
          background-color: #d9e8f3;
          }
         #all a:hover 
         {
          color: red;
          background-color: #8cbbda;
        }  
    </style>
   <%-- <link href="../Styles/Site.css" rel="Stylesheet" type="text/css" />--%>
</head>
<body>
    <form id="form1" runat="server">
    <div runat="server" id="all">
    </div>
    <div class="contentpage">
        <div class="contenttitle">
            <img alt="关闭" src="../Images/View/close.gif" />
        </div>
        <div id="contentcontainer">
        </div>
    </div>
    </form>
</body>
</html>
